﻿using System;
using ENail.Domain.Core;
using Equation.Enterprise.Framework.Domain.Model;

namespace ENail.Domain.Data.Mapping
{
    public class UserMapping : EntityMappingWithTypedId<User, Int16>
    {
        public UserMapping() : base("User")
        {
            Property(x => x.Id).HasColumnName("UserId");
            HasRequired(x => x.NailSalonContext).WithMany(x => x.Users).Map(x => x.MapKey("NailSalonId"));
            
            Ignore(x=>x.NailSalon);
        }
    }
}
